function D = para_cal(A, W, B, U, X)
%UNTITLED Summary of this function goes here
%   Detailed explanation goes here
    [n,m] = size(X);
    Z1 = zeros(n,m);
    Z2 = zeros(n,m);
    I = ones(n,m);
    for i = 1:1:m
       u = X(:,i);
       Z1(:,i) = 0.5*(abs(u+1)-abs(u-1)); %(exp(u)-exp(-u))./(exp(u)+exp(-u));
       Z2(:,i) = 0.5*(abs(u+1)-abs(u-1)); 
    end
    Uz = inv(U'*U)*U';
    D = (A*X - W*Z1 - B*Z2 - I)*Uz;
       
end

